Note: If you hit control + Enter with a certain part of code hilighted, you can run just that part of the code without having to run the whole thing (helps search for and isolate errors). Use chapters 1-2.4 for code needed.
Create map of Washington counties
Add in the place markers for each county
Add in eastern washington counties to create one grographic area (using larger areas than smaller ones)
Create basic eastern WA plot with cities in all of washington, then pull city names for specific counties (in eastern WA counties variable) back to create a new variable, ewa_cities. Use the wa_cities and ewa_counties vars to create a map showing counties and cities in selected region. Note - it seems it would be more helpful to show the names of each county rather than 1-8? Especially since I already manually added in the names in lines 49-60, but since this matches the example shown in the textbook I will leave it for now.
Use the ‘filter’ function to seperate cities within selected regoin (eastern washington, or ‘ewa’) vs cities outside the selected area (non-‘ewa’ cities). Note: I used purple and orange because I like these colors better than red and green.
Pull block group data for selected region (‘ewa’).
Use https://api.census.gov/data.html to access 2020 census info. I’m using red instead of green because I think the green markings are hard to see against the green parts on the map.
Use the one-chunk shortcut to mutate census population data.
Isolate the blocks for Spokane, WA in 2020.
Place these isolated blocks into a map. Note: This code doesn’t map anything because the ‘nfo_pop_2020’ variable is empty for Washington state. ``{r}
mapview(nfo_pop_2020, zcol = “pop”)
```